package me.zhengjie.minbearwcs.utils;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class JsonUtil {
    private static final ObjectMapper objectMapper = new ObjectMapper();

    public static String getJsonInfo(Object object) {
        String writeValueAsString = null;
        try {
            writeValueAsString = objectMapper.writeValueAsString(object);
        } catch (Exception e) {
            log.error("转成json错误", e);
        }
        return writeValueAsString;
    }
}
